<?php
$this->breadcrumbs = array(
    'MLM System',
    'Serial Top Up' => array('list'),
    'Create',
);

//action list
$this->menu = array(
    array('label' => 'List of Serial Top Up', 'url' => array('list')),
);

//action activate
if($this->action_activate == 1) {
    array_push($this->menu, array('label' => 'Serial Top Up Activate', 'url' => array('activate')));
}
?>
<?php if (Yii::app()->user->hasFlash('success')): ?>
    <div class="alert alert_grey">
        <img height="24" width="24" src="<?php echo Yii::app()->params['backendUrl']; ?>/images/icons/small/grey/success.png">
        <?php echo Yii::app()->user->getFlash('success'); ?>
    </div>
<?php endif; ?>
<?php if (Yii::app()->user->hasFlash('error')): ?>
    <div class="alert alert_grey">
        <img height="24" width="24" src="<?php echo Yii::app()->params['backendUrl']; ?>/images/icons/small/grey/alert_2.png">
        <?php echo Yii::app()->user->getFlash('error'); ?>
    </div>
<?php endif; ?>
<div class="flat_area grid_16">
    <h2>Create Serial Top Up</h2>
</div>
<div class="box grid_16 round_all">
    <h2 class="box_head grad_colour">&nbsp;</h2>
    <a href="#" class="grabber">&nbsp;</a>
    <a href="#" class="toggle">&nbsp;</a>
    <div class="toggle_container">
        <?php
        $form = $this->beginWidget('CActiveForm', array(
            'id' => 'sys-serial-topup-form',
            'enableAjaxValidation' => false,
            'htmlOptions' => array('enctype' => 'multipart/form-data'),
                ));
        ?>
        <div class="block">
            <div class="alert alert_grey">
                <img height="24" width="24" src="<?php echo Yii::app()->params['backendUrl']; ?>/images/icons/small/grey/alert_2.png">
                Fields with <span class="required"><strong>*</strong></span> are required.
            </div>

            <?php echo $form->errorSummary($model); ?>

            <div class="input_group">
                <?php echo $form->labelEx($model, 'serial_topup_serial_topup_type_id'); ?>
                <?php echo $form->dropDownList($model, 'serial_topup_serial_topup_type_id', CHtml::listData(sys_serial_topup_type::model()->findAll(), 'serial_topup_type_id', 'serial_topup_type_value'), array('prompt' => 'Please Select Top Up Value')); ?>
                <?php //echo $form->error($model, 'serial_topup_serial_topup_type_id'); ?>
            </div>

            <?php echo $form->labelEx($model, 'serial_topup_count'); ?>
            <?php echo $form->textField($model, 'serial_topup_count', array('size' => 20, 'maxlength' => 20)); ?>
            <?php echo $form->error($model, 'serial_topup_count'); ?>

            <button class="button_colour round_all"><img height="24" width="24" alt="Bended Arrow Right" src="<?php echo Yii::app()->params['backendUrl']; ?>/images/icons/small/white/bended_arrow_right.png"><span>Generate</span></button>

        </div>

        <?php $this->endWidget(); ?>

        <!-- form -->
    </div>
</div>